package day01;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author feng
 * @Date 2021/10/13 22:28
 *  线程池:
 */
public class ThreadPool {
    public static void main(String[] args) {
        // 创建线程池
        ExecutorService service = Executors.newFixedThreadPool(10);
        Test03 test03 = new Test03();
        service.execute(test03);
    }


static class Test03 implements Runnable{

    @Override
    public void run() {

        for (int i = 1; i <=100 ; i++) {
             if (i%2==0){
                 System.out.println(Thread.currentThread().getName()+"="+i);
             }

        }

    }
}

}
